<!DOCTYPE html>

<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>文章阅读</title>

    <link rel="stylesheet"
          href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.16.2/build/styles/default.min.css">
    <script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.16.2/build/highlight.min.js"></script>
    <link rel="stylesheet" href="" th:href="@{/lib/layui/css/layui.css}">
    <script th:src="@{/lib/layui/layui.js}"></script>

</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div th:replace="fragment/header::header" ></div>
    <div th:replace="fragment/left-nav::left-nav" ></div>
    <div class="layui-body">
        <h1 th:text="${article.title}" ></h1>
        <div th:text="${article.content}" id="content"></div>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.7.0/marked.js" integrity="sha256-K7OfhKvtqBJ0+5ngAlWG+5sJrlwDOC4OCWj+nP7qOnw=" crossorigin="anonymous"></script>
    </div>
    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © layui.com - 底部固定区域
    </div>
</div>





<script>
    layui.use(['jquery', 'form','layer','element'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var element=layui.element;
        var markdown  = $('#content').text();
        $('#content').html(marked(markdown ));
        // 代码高亮
        hljs.initHighlightingOnLoad();
    })
</script>
</body>
</html>